{ "cells": [ { "metadata": {}, "cell_type": "markdown", "source": [ "# Those damn interns\n", "## Problem Definition\n", "You are the production manager of a company. You have used the following programming model to define the optimal production plan. The problem is expressed in the standard form.\n", "Objective function:\n", "\n", "$\\max z = 3*x_1 + 4*x_2 - M*a_1 + 0*s_2 + 0*s_3$\n", "\n", "s.t\n", "\n", "$x_1 + 0*x_2 + a_1 + 0*s_2 + 0*s_3 = 18$\n", "\n", "$20*x_1 + 40*x_2 + 0*a_1 + s_2 + 0*s_3 = 1000$\n", "\n", "$26.67*x_1 + 20*x_2 + 0*a_1 + 0*s_2 + s_3 = 800$\n", "\n", "where M is a very large number and artificial and slack variables are indexed in order of appearance.\n", "\n", "The intern submitted the following data describing the solution obtained by a solver. This solver provides the solution of both the primal and the dual and a sensitivity analysis in a table, but your intern handled you the following handwritten report:\n", "\n", "X1 ->\n", "Solution value: 18\n", "Reduced Cost: ?\n", "Status: basic\n", "Objective coefficient: ?\n", "Objective Lower Bound: -Inf\n", "Objective Upper Bound: 5.334\n", "\n", "X2 ->\n", "Solution value: 15.997\n", "Reduced Cost: ?\n", "Status: ?\n", "Objective coefficient: 4\n", "Objective Lower Bound: 2.2497\n", "Objective Upper Bound: Inf\n", "\n", "A1->\n", "RHS= 18\n", "Slack = 0\n", "Sense = ?\n", "Shadow price= -2.334\n", "Min RHS= 17.9964\n", "Max RHS= 29.9963\n", "\n", "S2->\n", "RHS= 1000\n", "Slack = 0.12\n", "Sense = less or equal\n", "Shadow price= 0\n", "Min RHS= 999.\n", "Max RHS= Inf\n", "\n", "S3->\n", "RHS= ?\n", "Slack = ?\n", "Sense = less or equal\n", "Shadow price= 0\n", "Min RHS= 480.06\n", "Max RHS= 800.06\n", "\n", "\n", "**a.** You analise the solution and notice that there are some missing values noted as ? (You are going to fire this intern!). Write down the values missing in the solution. Motivate your response in each case.\n", "\n", "For decision variable $x_1$\n", "Since the value is non-zero (it is a basic decision variable), by complementary slackness, the reduced cost is 0. \n", "The objective function indicates that the objective coefficient is 3. \n", "\n", "For decision variable $x_1$\n", "Also, by complementary slackness, the reduced cost is 0 and since the value is greater than zero, the decision variable is basic. \n", "\n", "For slack, $a_1$\n", "If we note the coefficient in the objective function, (-M) we know that this is an artificial variable that must be always 0 and the sense is 'equal'.\n", "\n", "For $s_3$, \n", "The Right Hand Side for the third constraint is 800 looking at the problem. \n", "\n", "\n", "We can calculate the slack by substituting the values of X1 and X2 in the expression: \n", "\n", "26.67X1+20X2+0A1+0S2+S3=800\n", "26.67·18 + 20·15.997 + S3 = 800\n", "S3 = 0\n", "\n", "We could have also argued that since the solution is a Feasible Basic Solution, only 3 decision variables (in this case X1, X2, and S2) can be basic (as many as constraints) and therefore S3 must be non-basic (0).\n", "\n", "**b.** Which of the two decision variables has a larger contribution to the optimal solution? Motivate your response (1 point). \n", "\n", "If we multiply the value times the objective function: \n", "\n", "$3·x_1 = 3·18 = 54$\n", "\n", "$4·x_2 = 4·15.997 = 63.998$\n", "\n", "Clearly $x_2$ has a larger contribution to the objective function\n", "\n", "**c.** The first constraint determines the value of one of the decision variables ($x_1$). What would happen to the objective function if the right hand side of this constraint changes to 19? and to 31? Motivate your response\n", "\n", "The maximum RHS for the first constraint is 29.993. If the RHS changes to 19, the basic decision variables would remain the same, although the values in the optimal solution might change. If the value changes to 31 then the basic decision variables would certainly change. \n", "\n", "\n", "**d.** What would happen to the solution if the objective function coefficient of X1 changes to 5? And what if the coefficient of X2 changes to 3? Motivate your response\n", "\n", "The Upper bound for the objective coefficient of $x_1$ is 5.334 and therefore, the solution would not change if the objective 5 increased to 5. \n", "\n", "The lower bound for the objective coefficient of $x_2$ is 2.2497 and therefore, the solution would not change if the coefficient decreases down to 3.\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "pycharm": { "stem_cell": { "cell_type": "raw", "source": [], "metadata": { "collapsed": false } } } }, "nbformat": 4, "nbformat_minor": 2 }